#!/bin/python3
#-*- coding: utf-8 -*-
# exp_14.py
# @author 刘秋
# @email lq@aqiu.info
# @description
# @created 2020-02-18T21:33:29.222Z+08:00
# @last-modified 2020-02-18T22:28:32.174Z+08:00
#


def reduceNum(n):
    print("%d = " % n, end='')
    while n not in [1]:
        for index in range(2, n + 1):
            if n % index == 0:
                n = int(n / index)
                if n == 1:
                    print("%d " % index, end='')
                else:
                    print("%d * " % index, end='')
                break
    print()
n = int(input("请输入一个正整数："))
reduceNum(n)

def prime(n):
    l =[]
    while n >1:
        for i in range(2,n+1):
            if n%i==0:
                n=n//i
                l.append(i)
                break 
    return l

s = input("请输入一个正整数：")
if s.isdigit() and int(s)>0:
    # Python join() 方法用于将序列中的元素以指定的字符连接生成一个新的字符串。
    print (s,"=","*".join([str(x)for x in prime(int(s))]))
else:
    print("请输入正确的数字")